<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <title>新增模块</title>
    <link href="/after/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
    <link href="/after/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
    <link href="/after/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/after/css/animate.min.css" rel="stylesheet">
    <link href="/after/css/style.min.css?v=3.0.0" rel="stylesheet">

</head>

<body class="gray-bg">
<div id="app">
    <div class="wrapper wrapper-content animated fadeInRight">


        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>首页布局 <small>设置需要展示的模块及顺序</small></h5>
                    </div>
                    <div class="ibox-content">
                        <form method="post" action="/useModule/indexJson.do" class="form-horizontal" enctype="multipart/form-data">
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">系统内置模块
                                </label>
                                <div class="col-sm-10">
                                    <div class="checkbox i-checks">
                                        <label><input type="checkbox" disabled="" checked=""> <i></i> 活动幻灯片 </label>
                                        <a href="javascript:showDetails()"> 预览 </a>
                                        <label><input type="checkbox" disabled="" checked=""> <i></i> 热销产品 </label>
                                        <a href="javascript:showDetails()"> 预览 </a>
                                        <label><input type="checkbox" disabled="" checked=""> <i></i> 产品推荐 </label>
                                        <a href="javascript:showDetails()"> 预览 </a>
                                        <label><input type="checkbox" disabled="" checked=""> <i></i> 品牌线下 </label>
                                        <a href="javascript:showDetails()"> 预览 </a>
                                        <label><input type="checkbox" disabled="" checked=""> <i></i> 产品展示 </label>
                                        <a href="javascript:showDetails()"> 预览 </a>
                                        <label><input type="checkbox" disabled="" checked=""> <i></i> 右侧菜单栏 </label>
                                        <a href="javascript:showDetails()"> 预览 </a>
                                    </div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">自定义模块
                                </label>
                                <div class="col-sm-10">
                                    <div class="checkbox i-checks">
                                        <#list modules as module>
                                            <label><input type="checkbox" name="modules" value="${module.moduleId}"> <i></i> ${module.title} </label>
                                            <a href="javascript:showDetails(${module.moduleId})"> 预览 </a>
                                        </#list>
                                    </div>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button class="btn btn-primary" type="submit">保存内容</button>
                                    <button class="btn btn-white">取消</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 全局js -->
<script src="/after/js/jquery-2.1.1.min.js"></script>
<script src="/after/js/bootstrap.min.js?v=3.4.0"></script>
<!-- 自定义js -->
<script src="/after/js/content.min.js?v=1.0.0"></script>
<!-- iCheck -->
<script src="/after/js/plugins/iCheck/icheck.min.js"></script>
<script src="/after/js/layer/layer.js" charset="utf-8"></script>
<script>

    //初始化
    $(function(){
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
    })

    //模块预览
    var showDetails = function(id){
        layer.open({
            type:2,
            title:'模块预览',
            fix:'false',
            maxmin:true,
            shadeClose:true,
            area:['1100px','600px'],
            content:'/useModule/createTemplate.do?id='+id,
            end:function(){

            }
        })
    }
</script>

</body>

</html>